<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="js/jquery-1.8.3.js"></script>
<style type="text/css">
	.even		{ background:green;}  /* 偶数行样式*/
	.odd		{ background:red;}  /* 奇数行样式*/
	.first		{ background:gray;}
</style>
</head>
<body>
	<table>
		<tr>
			<td>姓名</td>
			<td>年龄</td>
		</tr>
		<tr>
			<td>lucy</td>
			<td>12</td>
		</tr>
		<tr>
			<td>mary</td>
			<td>22</td>
		</tr>
		<tr>
			<td>tom</td>
			<td>33</td>
		</tr>
	</table>
</body>
<script type="text/javascript">
	$(function(){
		$("tr:first").addClass("first")
		$("tr:odd").addClass("odd");
		$("tr:even").addClass("even");
	});
</script>
</html>







